<?php
require_once '../core/db_abstract_model.php';

class Tipoarticulo extends db_abstract_model{
    
    public   $nIdTipoArticulo;
    public   $sDescripcion;
    private  $bActivo;
    public   $dFecha;
    public   $sUsuario;
    public   $sTerminal;
    
    public function get($nIdModoAdquisicion='') {

    }
    
    public function set() {
    }
    
    public function edit($data=array()) {
      
    }
    
    public function delete(){

    }
    
    public function gettipos($param=''){
        $this->query="SELECT nIdTipoArticulo,sDescripcion from SCICTipoArticulo";
        if($param!='')
            $this->query="SELECT nIdTipoArticulo,sDescripcion from SCICTipoArticulo where nIdTipoArticulo=$param
                          UNION ALL
                          SELECT nIdTipoArticulo,sDescripcion from SCICTipoArticulo where nIdTipoArticulo!=$param";
        $this->get_numqueryresults();
        $resultset=array();
        if (count($this->result_rows)>=1){
            $resultset=$this->result_rows;
        }
        else{
            $this->msj=MSJ_NO_ADQUISICIONES;
        }
        return $resultset;
    }
    
    function __construct() {
        $this->db_name='DBSCInterno';
    }
    
    function __destruct() {
        unset($this);
    }
}
?>
